import request from "@/utils/request";

// 获取分类列表
export function getClassifyApi(query) {
  return request({
    url: "/system/classify/list",
    method: "get",
    params: query,
  });
}

// 根据分类编号获取详细信息
export function getClassifyByIdApi(id) {
  return request({
    url: "/system/classify/" + id,
    method: "get",
  });
}

// 查询分类列表（排除节点）
export function getClassifyListExcludeApi(id) {
  return request({
    url: "/system/classify/list/exclude/" + id,
    method: "get",
  });
}

// 新增分类
export function addClassifyApi(data) {
  return request({
    url: "/system/classify",
    method: "post",
    data: data,
  });
}

// 删除分类
export function delClassifyApi(id) {
  return request({
    url: "/system/classify/" + id,
    method: "delete",
  });
}

// 修改分类
export function updateClassifyApi(data) {
  return request({
    url: "/system/classify",
    method: "put",
    data: data,
  });
}
